You are here: Commerce Manager > Catalog Management > Working with Catalogs > Using CSV Files to Quickly Create Custom Catalogs

Using CSV Files to Quickly Create Custom Catalogs

Why Should I Use a CSV File?

The CSV catalog import is a feature in the Catalog Management system that enables you to import and manage catalog entries (such as Products, Variations/SKUs, Packages) in bulk using an excel spreadsheet (.csv format). It is an alternative to manually creating catalog entries directly in Commerce Manager, which can be tedious when dealing with a large amount of catalog data.

This feature enables you to accomplish these key tasks:

The CSV catalog import feature can be used for your entire catalog data, or just portions of them.

Import Overview

Here are the basic steps you can take to import and set up a new catalog using the CSV import feature. Before you start, choose an existing catalog folder or create a new one (in the Catalog Management system) to import the CSV files to.

  1. Create CSV data files (using Excel Spreadsheet, Notepad, etc.) with information about your categories, entries, and entry relations.
  2. Create necessary meta fields for the new catalog entries (in the Administration system).
  3. Upload the CSV data files to the CSV Import page.
  4. Create a mapping file for each CSV file. A mapping file is needed to link each column of data in a CSV file to the correct attributes in Commerce Manager.
  5. Import the CSV files and their corresponding mapping files into a specific catalog.
  6. Create entry relations to associate one entry with another (e.g., a Package and a Product, a Product and a Variation/SKU, etc.).

Format for CSV Files

CSV files you create and import into Commerce Manager need to have a particular format.

Mapping Types

Different mapping types are used to create the mapping files mentioned in step 4 above.

By selecting these options, the Commerce Manager will display different sets of Fields and Attributes for you to manually assign to each data column of your CSV file. Figure 8 and 9 below shows the display of the mapping files with the Category w/ Meta and Entry Relations Data type respectively. The items under Fields and Attributes with superscripts 1 and/or 2 are headers that are required attributes that must exist in the CSV files you are importing (1- required field for Insert, 2 – required field for Update).

Example: Importing and Setting up a New Catalog

The example below demonstrates how to use CSV import using the guidelines provided above.

Let's say you want to set up a "Baby Stuff" catalog with categories and entries as shown here in Figure 1.

Figure 1

Prerequisite: Create a new catalog

First, create a new catalog called "Baby Stuff" in the Catalog Management system.

Step 1: Create CSV files containing data for your new entries

Here you can download the sample CSV files that go with this example Sample Catalog CSV Files.

These files provide the base for the discussion in the following section.

The sample files contain the following:

CSV File Type 1 - Category File

This file specifies data for categories and/or subcategories within a Catalog.

The top line has column headers that will be matched with the Meta fields in the later steps. The headers can also have different names. As you will see in later steps, Category Code in column 1 is important since it specifies where the entry data will be stored. The code entered in under Parent Code in column 2 can be used to create subcategories. If the Parent Code is set to "null" or "root," then that category will be created in the root level of a catalog. In this example, the "Infants" and "Toddlers" category will be created at the root level, while the "Diapering Supplies" category will be located under "Infants" as a subcategory.

Figure 2

CSV File Type 2 – Entry Files

These files specifies data for Catalog Entries.  The Products, Variation/SKUS, and Packages CSV files for this example are shown in Figure 3, 4, and 5 respectively.

Figure 3

Figure 4

Figure 5

CSV File Type 3 – Entry Relations File

This file is used to link one entry to others. In this example, Var1 ~ Var5 (different diaper sizes) are associated to Prod1 "Diapers," Var9 ~ Var11 (different quantity for wipes) are associated with Prod2 "Wipes" and so forth. Also some variations are assigned to packages. Please note that the Prod, Var and Package codes MUST BE the codes from the entry CSV files (Figure 3, 4, and 5). If you include codes that are not defined in the entry CSV files, you will get an error while importing them into Commerce Manager in Step 4.


Figure 6

CSV file type 4 - Associations file

This file is used to create associations between different entries. In this example, Var 10 is associated to Var 1 as an Accessory, and Var 2 to Var 1 as a cross-sell item.

Figure 7

CSV file type 5 - Pricing/Inventory file

This file is used to specify the information for the Pricing/Inventory tab of each individual entry.


Figure 8

CSV file type 6 - Sale Price file

This file is used to specify the information for the Pricing section of the Pricing/Inventory page.


Figure 9

Step 2: Create necessary meta fields for the new catalog entries

For this example, no additional meta fields need to be created because the sample spreadsheet uses only the default attributes.
To create new meta fields follow these steps here.

Step 3: Upload the CSV data files to the CSV Import page

Follow these steps to prepare the CSV files for import:

CSV Import Tab

Figure 10

Step 4: Create a mapping file for each CSV file

Now create a mapping file that will specify the data in the CSV file to its corresponding attributes in the Commerce Manager.

Mapping file tab

Figure 11

Edit existing mapping file section

Meta Class, Language section

Data fle and CSV adjustment section

Fields and Attributes, Column headers in the data file, and Selected values section

The values presented under the "Fields and Attributes" column are representative of the "Meta Class" selected in the "MetaClass, Language" section above (which were either previously imported or created within Commerce Manager).
The values presented in the drop-down menus under the "Column headers in the data file" column are representative of the "Data file" selected in the "Data file and CSV adjustment" section above (which were previously imported above).

Save mapping file section

Figure 12

Step 5. Import the CSV files and their corresponding mapping files into a specific catalog

At the "CSV Import" tab view (Figure 12), do the following:

Step 6. Verify Your Import

In the Catalog Management system, expand the "Baby Stuff" folder under Catalog and verify that the contents of your CSV file were imported into the appropriate catalog.

 


Version: EPiServer Commerce 1 R2 SP2| Last updated: 2012-09-20 | Copyright © EPiServer AB | Send feedback to us